package com.ssm.server.consts;

/**
 * 返回信息代码列举类
 * @author lidongdong
 * 2017年11月22日 下午5:16:03
 */
public enum CodeEnum {
	
	/**
	 * 系统定义返回码
	 */
	INTERCEPTOR_ERROR(99,"前置处理请求出错"),
	ERROR(-1,"执行请求出错"),	//请求失败
	SUCCESS(0,"SUCCESS"), //请求成功
	ERROR_TOKEN(99,"token验证失败"),
	ERROR_CODE(1,"微信code无效"),
	USER_AREADY_REGISTER(2,"用户已注册"),
	VALID_FAIL(3,"验证失败,请检查手机号码或密码"),
	BAD_PARAMETER(4,"请求参数或签名不对"),
	ERROR_PAY(88,"支付失败"),
	USER_PUSH_OUT(5,"用户在另一台设备上登录"),
	HOUSE_NOT_EXIST(6,"房间不存在"),
	EXIST_PHONE_NUMBER(7,"此手机号码已注册"),
	ERROR_PAY_PWD(8,"支付密码验证失败"),
	USER_NOT_LOGIN(9,"用户未登录"),
	USER_PUSH_OUT_CHAOSHI(99,"用户登录失效"),
	LOGIN_FAILURE(10,"登录失败"),
	LOGIN_OUT_FAILURE(11,"注销登录失败"),
	UPDATE_PAY_PWD_FAILURE(12,"更新支付密码失败"),
	PAY_PWD_NOT_EXIST(13,"支付密码未设置"),
	USER_NOT_EXISTS(14,"用户不存在"),
	HTTP_ERROR(15,"执行http请求出错"),
	COIN_NOT_EXIST(16,"币种不存在或禁用"),
	BALANCE_NOT_ENOUGH(17, "余额不足"),
	ADDRESS_NOT_EXIST(18,"提币地址不存在"),
	ACOUNT_NOT_EXIST(22,"账户信息不存在"),
	CHANNEL_ERROR(23,"不支持此充值渠道"),
	RATHER_HOUSE_NUMBER(24,"参与份数大于剩余份数,不能加入"),
	CODE_VALID_FAIL(25, "短信验证失败"),
	HOUSE_NOT_ERRO(26, "房间不存在,有人抢在您前面投注完成了！"),
	TRANSFER_YES_EXIST(27,"充值记录已存在"),
	HOUSE_NO_EXIST(28,"房间已开奖，禁止投注"),
	PASSWORDERROR(29,"密码不对"),
	AGENCYERROR(30, "已成为代理商"),
	BOXERROR(31, "卡片已售完"),
	THEREWARDFAILED(32, "喜票获取失败"),
	PAYERROR(33, "购买失败，正在发起退款"),
	FAHUO_QUERY_ERROR(35, "查询发货状态失败"),
	/**
	 * 短信验证服务返回码
	 */
	SMS_SUCCESS(50000,"短信发送成功"),
	NULL_PHONE(50004,"手机号码为空"),
	NULL_TEMPLATE(50005,"模版ID为空"),
	INVALID_PHONE(50006,"手机号码无效"),
	NO_SMS_CODE_AUTH(50008,"此手机号码未开通短信业务"),
	OUT_OF_FREQ(50009,"验证码发送过于频繁"),
	INVALID_CODE(50010,"验证码无效"),
	EXPIRED_CODE(50011,"验证码过期"),
	VERIFIED_CODE(50012,"验证码已验证通过"),
	NO_MONEY(50014,"可发短信余量不足"),
	MISSING_CODE(50015,"验证码为空"),
	SERVER_ERROR(50019,"服务端异常"),
	WRONG_MSG_ID(50026,"msg_id 无效"),
	APP_IN_BLACK(50036,"应用被列为黑名单"),
	HAS_BLACK_WORD(50037,"短信内容存在敏感词汇");
	
	private int code;
	private String msg;
	
	private CodeEnum(int code,String msg){
		this.code = code;
		this.msg = msg;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}
}
